using UnityEngine;

public class InGameTutorialDistCaptured : InGametutorialWatetime
{
	public MapDistrict district;

	public BoxCollider collider;

	public override bool OnStepStart(string name)
	{
		for (int i = 0; i < values.Length; i++)
		{
			if (!(values[i].value == name))
			{
				continue;
			}
			if (district == null)
			{
				district = GetComponentInParent<MapDistrict>();
			}
			if (district != null && district.distName == BCWStorage.Get<string>("respect_tutor_lvlName"))
			{
				if (collider != null)
				{
					collider.enabled = false;
				}
				return base.OnStepStart(name);
			}
		}
		return false;
	}

	public override void OnEnd()
	{
		for (int i = 0; i < values.Length; i++)
		{
			if (values[i].started && collider != null)
			{
				collider.enabled = true;
			}
		}
		base.OnEnd();
	}
}
